From 9c8b41b231e364aeedfdecf65ddee9dd478b702c Mon Sep 17 00:00:00 2001 From: robertl Date: Sat, 20 Dec 2003 19:12:24 +0000 Subject: [PATCH] Accept comments in input. --- gpsbabel/gpsutil.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpsbabel/gpsutil.c b/gpsbabel/gpsutil.c index 1b536ef50..41761c1a4 100644 --- a/gpsbabel/gpsutil.c +++ b/gpsbabel/gpsutil.c @@ -58,6 +58,8 @@ data_read(void) waypoint *wpt_tmp; for(;fgets(ibuf, sizeof(ibuf), file_in);) { + /* A sharp in column zero or an blank line is a comment */ + if (ibuf[0] == '#' || ibuf[0] == '\n') continue; sscanf(ibuf, "%s %le%c %le%c %ld%c %30[^,] %c", name, &lat, &latdir, &lon, &londir, &alt, &alttype, desc, icon); -- 2.30.2